home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 22 / 9 / DISK2290.ZIP / NG_SPLIT.ZIP / NG_SPLIT.DOC < prev    next >
Text File  |  1988-08-12  |  7KB  |  152 lines

  1. /************************************************************************/
  2. /*                                    */
  3. /*    ng_split - splits Norton Guides database into components    */
  4. /*                                    */
  5. /************************************************************************/
  6. /*                                    */
  7. /*    ng_split, Copyright (C) 1988, by John C. Gordon            */
  8. /*    Norton Guides Splitter, 12 August 1988, ALL RIGHTS RESERVED    */
  9. /*                                    */
  10. /*    This program is meant for those of us who bought the Norton    */
  11. /*    Guides and were disappointed by the fact that we couldn't    */
  12. /*    modify the databases provided for our own purposes (by making    */
  13. /*    the fatal assumption that "customizing the Guides" included    */
  14. /*    the ability to customize the published databases).        */
  15. /*                                    */
  16. /*    I have been able to take the databases provided in the Guides,    */
  17. /*    "un-compile" (split) them into their component parts, and    */
  18. /*    then re-compile them back into a database using the NGC and    */
  19. /*    NGML utilities provided with the Guides.  The resulting        */
  20. /*    database is identical to the original using DOS 'comp'        */
  21. /*    (except for a six-character difference in the Microsoft C    */
  22. /*    database, which does not affect execution).            */
  23. /*                                    */
  24. /*    I have tested this program on the Norton Guides for Turbo C    */
  25. /*    Microsoft C.  Others have tested it on the other published    */
  26. /*    databases and some public domain ones.  If you find that it    */
  27. /*    does not work for some database, I will be glad to look at    */
  28. /*    the code to see if I can get it to work.  I will need a copy    */
  29. /*    of the database file, however (only for debugging - the        */
  30. /*    disk(s) will be returned with a copy of the new program).    */
  31. /*                                    */
  32. /*    There are some funny file formats possible which NG_SPLIT    */
  33. /*    doesn't handle right now.  They will be corrected in V2.0 in    */
  34. /*    a couple of months.  They do not appear in any of Norton's    */
  35. /*    databases (as far as I know), but they can be created by the    */
  36. /*    NG software.  Please send me a copy of anything that NG_SPLIT    */
  37. /*    can't handle, so I can make sure that everything is covered.    */
  38. /*    Included in V2 or V3 will be a utility to re-write the funny    */
  39. /*    source code into something more reasonable, since usually the    */
  40. /*    strange formats mess up the operation of the grey + key.    */
  41. /*                                    */
  42. /*    If you like this program and would like to see more like    */
  43. /*    it, please contribute whatever you think this program is    */
  44. /*    worth to you (recommended $5 or $10).  Thank you.        */
  45. /*                                    */
  46. /*            John C. Gordon                    */
  47. /*            Post Office Box 25107                */
  48. /*            Alexandria, VA  22313-5107            */
  49. /*                                    */
  50. /*            Home phone : (703) 528-2205            */
  51. /*                                    */
  52. /************************************************************************/
  53.  
  54. /************************************************************************/
  55. /*                                    */
  56. /*    ng_split        Version 1.2        12 August 1988    */
  57. /*                                    */
  58. /*    Purpose:    Split a Norton Guides .ng database into        */
  59. /*            its original component source files        */
  60. /*                                    */
  61. /*    Syntax:        ng_split db_name                */
  62. /*    Where:        'db_name' = the name of the Norton Guides    */
  63. /*            database (with or without the .ng suffix)    */
  64. /*                                    */
  65. /*    Restrictions:    1)  The NG database must be located in your    */
  66. /*                current working directory.            */
  67. /*            2)  The database must not be "active" when    */
  68. /*                you run ng_split.  You must either        */
  69. /*                uninstall the Guides or copy the database    */
  70. /*                to a different (work) directory first.    */
  71. /*            3)  Due to the intensive character I/O, you    */
  72. /*                should run from your RAMdisk, if possible.    */
  73. /*                                    */
  74. /*    Remarks:    ng_split will create several files in your    */
  75. /*            current working directory :            */
  76. /*                                    */
  77. /*        'db_name':    the menu link control file        */
  78. /*        'db_name'.bat:    a batch file containing the commands    */
  79. /*            to re-create the database            */
  80. /*        'dbxx'_000:    the individual source data files are    */
  81. /*            named 'dbxx'_000 through 'dbxx'_999, depending    */
  82. /*            on how many files are needed.  Note : 'dbxx'    */
  83. /*            is the first four characters of 'db_name'.    */
  84. /*        temp:    a temporary file which is deleted on exit    */
  85. /*                                    */
  86. /*    For example : if you are splitting the Turbo C database tc.ng,    */
  87. /*        you would use the command:    ng_split tc        */
  88. /*        which would create files:    tc            */
  89. /*                        tc.bat            */
  90. /*                        tc_000 through tc_011    */
  91. /*                        temp (deleted)        */
  92. /*                                    */
  93. /*    Change history:                            */
  94. /*        V 1.0 - 17 June 88 - original program            */
  95. /*        V 1.1 - 18 July 88 - allow databases with names longer    */
  96. /*                than six characters or with more than    */
  97. /*                26 source files and update docs        */
  98. /*        V 1.2 - 12 August 88 - fix bug with !short with no data    */
  99. /*                following it and !file.  also added    */
  100. /*                status lines and better error messages    */
  101. /*                                    */
  102. /************************************************************************/
  103.  
  104. /************************************************************************/
  105. /*                                    */
  106. /*    Hints on interpreting error messages :                */
  107. /*                                    */
  108. /*    In general, all error messages indicate that NG_SPLIT was    */
  109. /*    unable to successfully split your database.  In those cases,    */
  110. /*    I would appreciate it if you could send me a copy of the    */
  111. /*    database, so I can correct the program.  There are two error    */
  112. /*    messages, however, which I can do nothing about :        */
  113. /*                                    */
  114. /*    Write error - possibly out of disk space            */
  115. /*        - this indicates that either you are out of space    */
  116. /*          OR your directory cannot hold any more files.        */
  117. /*                                    */
  118. /*    WARNING - Database error                    */
  119. /*        - this one comes up if there is an error in the        */
  120. /*          database itself.  It occurs when it is trying to    */
  121. /*          locate a !seealso segment and the database contains    */
  122. /*          an illegal address.  You can verify this by looking    */
  123. /*          at the output file which contains the error and    */
  124. /*          searching for the string :        _???.ngo:    */
  125. /*          Make note of the name of the faulty !seealso clause    */
  126. /*          ( the name in quotes after the colon ) and the name    */
  127. /*          of the !short section which contains it ( backward    */
  128. /*          search for !short: ).  Next, look at the menu link    */
  129. /*          control file ( same name as the database, but without    */
  130. /*          the .ng suffix ) and look for the name of the output    */
  131. /*          file which contained the error.  Make note of the    */
  132. /*          menu heading and the menu item which corresponds to    */
  133. /*          that file.  Now, bring up the database and find the    */
  134. /*          menu heading and menu item.  Then, look up the name    */
  135. /*          of the !short item you located before.  You will    */
  136. /*          notice that it has a !seealso item with the faulty    */
  137. /*          clause name.  If you try to select that !seealso    */
  138. /*          clause, nothing will happen.  I don't know why this    */
  139. /*          happens and have only seen it happen in one database    */
  140. /*          If I get several different databases with this    */
  141. /*          problem, I may be able to find a pattern and find a    */
  142. /*          way to correct the database and the source files.    */
  143. /*                                    */
  144. /*          Of course, the above instructions to verify the    */
  145. /*          database error are a little more complicated if the    */
  146. /*          error is in a !file instead of a !short called from    */
  147. /*          the menu, but its the same principle - its just a    */
  148. /*          little more work to find out which !short the error    */
  149. /*          is in.                        */
  150. /*                                    */
  151. /************************************************************************/
  152.